Skip to content

Instantly share code, notes, and snippets.

@littlee
littlee / toUnicode.js
Last active May 9, 2024 05:11
JavaScript convert string to unicode format
function toUnicode(str) {
return str.split('').map(function (value, index, array) {
var temp = value.charCodeAt(0).toString(16).toUpperCase();
if (temp.length > 2) {
return '\\u' + temp;
}
return value;
}).join('');
}
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 9, 2024 05:10
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@magnetikonline
magnetikonline / README.md
Last active May 9, 2024 05:08
Install AWS CLI v2 from source.

Install AWS CLI v2 from source

Bash script to install the latest released version of the AWS CLI v2 from the distrubuted source.

Using this method to exectue the CLI under a MacBook M1 laptop as a native ARM binary - rather than falling back to Rosetta. Currently the offically packaged macOS .pkg doesn't support both Intel/M1 architectures.

Script designed to be re-run - will blow away an existing install and re-install the latest available version.

Note

This install script assumes you have installed a suitable version of Python 3 - has been tested against Python 3.10.11 under macOS Sonoma v14.4.1.

@xrman
xrman / gist:4468f545b169969466bceb694d742dad
Created March 12, 2019 21:47
FastStone Capture Full Serial Key
Registration Code
Name : www.xyraclius.com
Serial : OOCRYIMDMDPWRETFPSUZ
@fnky
fnky / ANSI.md
Last active May 9, 2024 04:58
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if UNITY_EDITOR
using Mono.Cecil;
using Mono.Cecil.Cil;
public static class ByRefGen {
public static void RemoveByRefType(string src, string dst) {
ModuleDefinition moduleDefinition = AssemblyDefinition.ReadAssembly(src).MainModule;
@lindig
lindig / dir.ml
Last active May 9, 2024 04:54
OCaml - list recursively regular files in a directory
(** [dir_is_empty dir] is true, if [dir] contains no files except
* "." and ".."
*)
let dir_is_empty dir =
Array.length (Sys.readdir dir) = 0
(** [dir_contents] returns the paths of all regular files that are
* contained in [dir]. Each file is a path starting with [dir].
@thimslugga
thimslugga / 01-setup_docker_al2023.md
Last active May 9, 2024 04:54
Setup Docker and docker-compose on Amazon Linux 2023

Setup Docker on Amazon Linux 2023

Steps to Install and Setup Docker on Amazon Linux 2023

Install the packages

Install the following packages, which are good to have installed:

sudo dnf install --allowerasing -y dnf-plugins-core \